[ADDED]: added solution for issue #4.