simplifying logic in outdated files