need to use method instead of function