struggling with types