some code beautifying