bug fix (wasn't returning value)