made sure function returns a value