Fixed the repetitive method