updated with fresh code