fix code with snprints et all