adapted conventions and code clean up