partially finished shifting. TODO: use more register structs