added block and throw