test: add more prototypes and refactory