added and modified functions