These 3 lines are repeated 4 times. Considering rearranging the methods.