added support for different resolutions and frame rates