tweak to api + some documentation
added lower casing of keys for safety