migrate builds
migrate builds
bugfix and refactor