[improved the code]