changed to correct math