Added method to get free memory