finishing writing data and adding navbar