Implementation for issue #1

Please verify.