fixed a huge derp

functions now workproperly