pulled floating functions out of models into util