more work on head/tail for edges