add finish() function to make splash screen auto close
code cleanup