small changes, formated code