add source checking