Give phases periods, not only id's

Depends on #97