solved window problem now optimized for best use