added function to retrieve values as integer