read raw input properly