commented engine code