Adding early scala implementation