final bug fix and styling