Changed some function structures