Made window more dynamic