adding is_loaded test