implementation for #360