refactor further