finished js part