build in tray function to get data