added pictures, refined algorithm, added idle page