add db changed function and put content inside view