changed some datatypes and NULL Pointers