make functions simple and using mantle to parse JSON