flesh out logic, print debug output