escape method now excepts arrays