move function call outside
add some styles