added deleteByPattern method