works for main, higher orders not working for results