under working, add rendering functions, not checked yet