added ORM functionality