prefer using the definition object over returning a function