updated remove() in api