things are working - completely refactored