update readme and make some functions private