prettify code a little