implement all api methods