java delete function for thought on space page