refactor methods to get solution values