I have a problem that I have used 2 different methods for: Method a: and Method b: Does anyone know of a better or different way to do this?