modified for addslashes