fixed response format, bugged though, need to add graph functionality