Adding element implementation.