Continutation of PR 2052

This is the continuation of PR 2052