removed imshow and waitKey calls