implemented put method