finalized API - first real working version