need to add conditionals for bad pointers