removed instans of state in clocksetup constructor and added if to select value instead.