Added option to return an dict