Added filter to getKey method