add composer and tests and adapted to psr2