better construction of code