fixed reverse sequence handling
edited reverse sequence handling