resolved 'invalid recursive type' error