removed throw, changed it to return