it works in codepen so why doesnt it work in the actual browser