Added functionality for https