Abstract out common method and better error checking