create association and fix error