changes necessary for ios block support
merge with block implementation and updated code, test cases