updated curring functin