got rid of pa and sa globals allocation and freeing issues. so we're back to no definitely lost blocks on valgrind