edited code formating