Optimized
1 - findDetails finds upto 4 details (instead of 5)
2 - solved a bug in window equation