solved a couple of pointer issues, fixed initialization