MADE THE CODE BETTER