factory functions added
Added a schema for factories