added a constructor that initializes with an element