1. draft working traceback - only tested on small examples