implement coercions (mostly)