rewritten c2g controller