handling implicit/explicit casting, with passing test