Turns out bash wont allow you to return a value