refactor and instances