Change id to be method instead of function