fixing braces and removing array to string conversion