use $.proxy to preserve the context