handle differnet orientations and remove usage of file in client site