updated on docs with code details