amounts javascript modified