fixed styles
reformed code