added custom deallocation function
automatically install test dependencies if missing