refactor meter