unit bug and style violation fixed