Timer and main added