removing legac code