modified coding style to fit work requirements