add ends constructor