cleaned up  but still slow