implements basic finctions