Added and fixed inverted mode. Note to self: remember to cast variables just to be sure
Commented out debug message. It can be used to adjust values if needed