add calculation of election timeout based on retrytimeout
make control use new sp interface