first merge with core algo and auth