changed some constructors and added all into a api