input validation improved and 404 page added