added stability, added comments