updated to grab equation and variables