logic code has been updated