working ... refactor????