add cors middleware
change to obects