updated a little code