removed unnecessary imports and improved value comparison in case of
immutability