added stability checks