use c3p0 for database connection pool;add validation for adding friends