Removed null error and added new feature