started refactor to provide more 'fun'ctionality