implemented sub