added lock and unlock magics