update layout
add input validation