refactor keys a bit