fix the bug finish the prototype