added download feature
applied some enhancements