improved JS