fixed p() and s() to accept empty strings