added comments and fixed validation errors