added main
refactor