Redisigned the input and rendering methods
input and render done