added data checks