js for creating shifts