Better Logic

Thanks to Elvis Nunez
https://github.com/NSElvis