updated type inference,  seems to compile
updated some getter