implemented deletion in friend table and fixed a bug