Changed expr usage to bash arithmetic