got rid of almost all warnings