Partial implementation for #6