class and method names renamed
head tail operations tested