refactor and api fersion to 7 (2.1)