add comment and improve readability