Adding save to js