cleaning up old factor code