now checking if frame exists before appending it to the list