add main fn