processes input