refactor code
refactor
reconnect feature (still not enouth)