type mismatch needs to be worked out