refine source and spec