threading and picture generating done