fixed code style issues
fixed bug and added a build