indentions and bug fix