Functions return proper values