remove unnecessary threading, remove unnecessary var m from linear gradient