liberty and eat and associated test function
fixed merge error