Refactor this proc too.