Functionality added

Functionality added. Please review.