build() method implementation