implement via scala

add multiple package support