instead of hardcoded args, main func takes object