updated code readability