added scala formatting