this could be cleaned up