further improvements to achieve clean code