added username argument for api