restructure inline method