added basic version control algorithm
added updates on window changes