Converted cantbm file to function #1