first approach implemented, testing added