Reorganizing code
adding external dependency