refined API to only accept hashes as argument