refactor last two tabs