some useful stored procedure for me