Add working prototype, need to add test cases