major overhaul of the coding, added 4 classes + cleaner code