add endpoint generation and test