replace placeholders with values

and update js accordingly