moving common logic to leda class