Improved and parameterized perfect hash function generator