re organized to follow dart conventions