made few changes to couple functions i can not seem to get to work
properly, more trouble shooting later