got the windows working

updated code to the new database and got it working.
now only update window need to be done