Move j assginment to the condition

i will eventually become 0 and it would be the last value assigned to j
500: Use push return value to set g. Remove g and j initial values