refactor to dashboard