made additional api endpoint, fixed file retrieval