fixed output functionality