added gradient, sped up ws process