finished translating sim code to use new bart package