getting close to finished, needs to be polished and error checking added