move custom cpp lines out