move definition out of method