fixed code to comply with 0.11 rust standards