clearning gensgd, removed last_item and rate5, added support for real variables