changed event to use globaly set database variable