resolves #24, resolves #16