fixed code to look nicer