application ends properly now