moved main to lib/