Altered function with a typo.
Removed dependency on profile2 and added block.