added docu for cast scalar function