a more comprehensive way of returning values