Added optional repeat value