add exception handeling to getReg and setReg
add exception handeling
add a thing or something