fixed makeup & refactoring code