add validation logic
cleanup