refactor in abstract