merged functions