fixed warnings and remove split function due to deprecation