Removed variable q, as it was useless