resolves #37. resolves #39