changed util functions for lookup table creation