updated util to return proper values