some code beautification