small fixes in studies
working on function prepare