Layer algorithm

2009