implement downloadall function