changed all code it now works