using forEach instead of Fing for loops, removed debug_log