minor code neaten