On loop space formulation of gauge theories