started coding legendre subsystem