Renderfunction added, everthing is working