Still should probably clean up the return values. Also should look into how to exit early from the script