changed code in conformity with stylegide