diff added, small bugs fixed