input handling is accurate now