shortner function works properly