add dependency checking