added inline styles, moved function call to end