working version

Just did some cleanup