added convenience functions for headSize and tailSize