adding data checking