adding function small fix