separated the execution of layers from the retrieval of corresponding values. Fixes #210
fixed a broken dependency