doing proc function