implemented finish button