added better styling and more error validation