range and output added