Work in progress.
throw error added for dependence check