added init method to beans