fix ranges
clean up p6