how gpm works