better processing for ranges
better type processing inside ranges