generate and scale input correctly