added cstdlib to connection.cpp