fixed bug in mload
added debugging functions