Prototype #1 with some changes