add a main function
split file for readability improved
create new module src with source code