Remove duplicated code

They both do the same thing!