crappy refactoring fix