Re-arranging inputs