move selfcheck outside of the main file