re-structured entire thing