make address and port changeable in config
fix api implementation