style and fixing bugs