moved function from public to private section