fixed #57

add models validation
repair some factories