three layer implemented