main works, no clue about refinement
changed ref quantity