code restructuring and fallbacks added