modified this code somewhat which caused it to not work
needs to be worked on more