added pre-existing code