major changes to both not 100% they work but I have to sleep :)
fixed a stupid typo