code refactoring added styles