add function main to start app