new version of API (added comments)