add to prime reimpl