frontend sending correctly format input to backend