Implementation for #50