multi return functionality added.