Moved the logic code to service file