almost complete version