made it runnable - still not organised tho