adding style and fixing code