added various functionalities.