updated input procedure