refactor to work with ionic beta 14