Handled it in a better way