Casting function "as" introduced - it Fixes #8

Review by @vjovanov