short p function and string class