trying to fix small screen javascript to work