changed lots of variable types.