minimal implementation of append API