implement simple layered architecture