Pull out some logic from get method