some functions & tests done