added validation to book model