Add logic to prepare data