some minor changes to the code to make the UI look better