almost done, need add JS control