small changes
made error var unexported, format change