implements compare method
delete useless import