added render function
added style reset upon updating