@rwaldron 
Will you please review the patch and help in modifying the code.