added beans and added testcases