implementing bubble technique