changed logic format
changed logic format