automatic aspect ratio calculation added