More functions added. Test needed.