handle args more intelligently