implemented post handling + json reply