create javascript solution