impproved problem with js