refactored the code and pulling data from the proc system instead of ps to improve accurracy