some code beautifying 2