adapted convention and code clean up