resolves #19, resolves #23