square bgs coded part 1