fixed LD/ST and rx/ry ordering, still got bugs though