add exception and removed compile errors