update algorithm, CSS and allow user input