refactor, add scripts