fixed almost all warnings