add tested business logic
add docmentation on functions