updated to use click for cli