Fixed code repitition