Adding thread safe operation