Change FID for analytical formula and becoming a subroutine