gi: extract singleton method define code