solves issue #23
solves issue #24