Added comments and Function