added block functionality