Casting function "as" introduced - it Fixes #8 - review by @vjovanov