remove() method signature changed to return removed key else return null