assertions + printf cleaned up