Everything working but the tick function