refactored, is anything working now?
getting somewhere...