some logic code