updated source with basic implementation