better debug, simpler code