moved methods to apilayer to fix issue with chaining