refactor and work for summit