new funcations for processing data