Refactor to comply previous interface