Javascript adjusted