Now supports N number of axes [Needs work]