Added logic to get data