organizeInput function

Organize Input