finished implementation for stock window generator