Added getHeadPosition method to CommonMethods