not working yet, but nice refactoring!!