tests and api tuning