added rough timer, needs separate threads maybe