added factories
merged factories
fixed syntax error