added gay level function