implemented q()
fix all loop ranges and prepare rgb() test