compilable version with first layout