semi-workable, needs better append and sanitize