Wrote normal calculation script