Trying to improve js