added function to run stored procedure