almost completed, just need to fix why it freezes