removed unnecessary for-loop