more work on api & model