my homework from JS