shortened JS code