working on backwards IR routine