working for all global cases except 0 and 7