need to add some API and almost finished