numerical implementation of helical phase