added initial data support, small other fixes