re-indented some code