first version with basic argument processing