Fixing the extra written code