refact for ocframework