replaced split with explode since split is deprecated in php 5.3