initial commit
bug fixes and comments
adding comments and a bug fix
init