COmpleted autolaoder with tests