orm functions