refactoring and add an alloy file