Added headerfile for locking functions