working version--all axes