added initial window calc