fully documented version