be sure to check for null values from database