few small type changes to get it working