refactor Effect class