implementation for window factory method added