mike's code
add some operation of database