Add some comments and few functions