methods for creating instance from plain data