REFACTOR: some stuff