forked and added select ranges