change loop extension to be more type agnositic since it was causing problems with em trained model for some reason