added inheritance to Runnable