moved implementation in-line