clean up and more semantic code