removed unused use declaration
modified a check to make it more semantic