added conditionals for r-type, b, and j