Additional code for issue #12