started implementing the logic - not hooked up to real data yet