added some useful code