edited register, not sure if working