implemented missing intrinsic functions