added origins control and build reviewed
added origins support