separate for Register, and Publish. BaseModel should be created in the same file, so that its easy to understand the code