added mutex functions