Coded based on shell/outline. tested, works.