removed shared_ptrs and replaced with regular pointers