not rendering correctly, but functions are being called