refactored folder to take folder object instead of folder name in recognition of angular best practices and security ;)