Fix code smell (code duplicity)