fixed error from merge, extra functions