assignto reads input correctly