First Working Version

This version works, although the coding is sloppy